package com.ruoyi.project.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.BeamRecordMapper;
import com.ruoyi.project.domain.BeamRecord;
import com.ruoyi.project.service.IBeamRecordService;

/**
 * 浆纱上机记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-02
 */
@Service
public class BeamRecordServiceImpl implements IBeamRecordService 
{
    @Autowired
    private BeamRecordMapper beamRecordMapper;

    /**
     * 查询浆纱上机记录
     * 
     * @param id 浆纱上机记录主键
     * @return 浆纱上机记录
     */
    @Override
    public BeamRecord selectBeamRecordById(Long id)
    {
        return beamRecordMapper.selectBeamRecordById(id);
    }

    /**
     * 查询浆纱上机记录列表
     * 
     * @param beamRecord 浆纱上机记录
     * @return 浆纱上机记录
     */
    @Override
    public List<BeamRecord> selectBeamRecordList(BeamRecord beamRecord)
    {
        return beamRecordMapper.selectBeamRecordList(beamRecord);
    }

    /**
     * 新增浆纱上机记录
     * 
     * @param beamRecord 浆纱上机记录
     * @return 结果
     */
    @Override
    public int insertBeamRecord(BeamRecord beamRecord)
    {
        beamRecord.setCreateTime(DateUtils.getNowDate());
        return beamRecordMapper.insertBeamRecord(beamRecord);
    }

    /**
     * 修改浆纱上机记录
     * 
     * @param beamRecord 浆纱上机记录
     * @return 结果
     */
    @Override
    public int updateBeamRecord(BeamRecord beamRecord)
    {
        beamRecord.setUpdateTime(DateUtils.getNowDate());
        return beamRecordMapper.updateBeamRecord(beamRecord);
    }

    /**
     * 批量删除浆纱上机记录
     * 
     * @param ids 需要删除的浆纱上机记录主键
     * @return 结果
     */
    @Override
    public int deleteBeamRecordByIds(Long[] ids)
    {
        return beamRecordMapper.deleteBeamRecordByIds(ids);
    }

    /**
     * 删除浆纱上机记录信息
     * 
     * @param id 浆纱上机记录主键
     * @return 结果
     */
    @Override
    public int deleteBeamRecordById(Long id)
    {
        return beamRecordMapper.deleteBeamRecordById(id);
    }
}
